package com.bocai.movie.mapper;

import com.bocai.movie.model.Movie;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author create by VIC.Huang
 * @date 2018/4/1
 */
@Mapper
public interface MovieMapper {
    @Select("select title, head_img_path headImgPath, file_path filePath, create_time createTime " +
            " from t_movie order by id desc limit #{start}, #{count}")
    List<Movie> selectMovieList(@Param("start") int start, @Param("count") int count);

    @Select("select count(1) from t_movie")
    int countMovie();
}
